package cn.kgc.ebook.controller;

import cn.kgc.ebook.pojo.Ebookcategory;
import cn.kgc.ebook.pojo.ResultEntity;
import cn.kgc.ebook.service.EbookcategoryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class CategoryController {

    @Resource
    EbookcategoryService service;
    @RequestMapping("/getCategoryList")
    public ResultEntity<List<Ebookcategory>> getCategoryList(){
        List<Ebookcategory> ebookcategories = service.seleEbookcategory();
    return ResultEntity.successWithoutData(ebookcategories);
    }
}
